Computer virtualization is a technique that involves encapsulating a physical computing machine platform in a virtual machine that is executed under the control of virtualization software running on a hardware computing platform, or “host.” A virtual machine has both virtual system hardware and guest operating system software. Virtual system hardware typically includes at least one “virtual disk,” which is a single file or set of files that appears as a typical storage drive to the guest operating system. The virtual disk may be stored on the host platform or on a remote storage device. Typically, a virtual machine (VM) uses the virtual disk in the same manner that a physical storage drive is used, that is, to store the guest operating system, application programs, and application data.
The virtualization software, also referred to as a hypervisor, manages the guest operating system's access to the virtual disk and maps the virtual disk to the underlying physical storage resources. Generally, such physical storage resources can reside on the host platform itself or in a remote storage device, such as a storage area network (SAN) or network attached storage (NAS). The physical storage resources may include hard disk drives and/or solid-state drives, where solid-state drives typically have lower-latency compared to hard disk drives, and therefore typically reside on the host platform.
In conventional virtualization architectures, virtual disks, whether physically supported by hard disk drives or solid-state drives, are exposed to the guest operating system as small computer system interface (SCSI) compliant devices, and therefore appear to the guest operating system as a hard disk drive. As a result, the guest operating systems issue SCSI compliant commands when carrying out input/output operations (IOs). The hypervisor translates SCSI commands to file operations to target files that represent the virtual disks and then the file operations are converted to SCSI commands (if the virtual disks are supported by hard disk drives) or to commands developed for interface standards of solid-state drives such as serial advanced technology attachment (SATA) (if the virtual disks are supported by solid-state drives). As can be seen, even in situations where virtual disks are supported by-solid-state drives, guest operating systems may only issue SCSI compliant commands and this may lead to inefficient usage of the underlying solid-state drive.
For example, the TRIM command, which is a part of the SATA command set, enables an operating system to inform a solid-state drive which blocks of data are no longer considered in use and can be reclaimed internally through a process called garbage collection. If this command is not available to the guest operating system and only the corresponding UNMAP command, which is a part of the SCSI command set is available, the guest operating system often does not inform the hypervisor of data blocks of the virtual storage device that are no longer needed and can be reclaimed through garbage collection because of conditions placed on when the UNMAP command may be issued. As a result, fragmentation of data in the virtual storage device is increased, making it more expensive to reclaim storage in the underlying physical solid-state drive.